Log in Register Dashboard Temp Share Shortlinks Frames API

cody - HTMLify profile

cody's Profile Picture

cody

4270 Files

632089 Views

Latest files of /cody/vishal-dcode/Incrementing Counter

app.js cody/vishal-dcode/Incrementing Counter/app.js
5 Views
0 Comments
// Select all elements with the class "counter" and store them in a NodeList
const counters = document.querySelectorAll(".counter");

// For each counter element in the NodeList, perform the following actions:
counters.forEach((counter) => {
// Set the initial innerHTML value of the counter element to "0"
counter.innerHTML = "0";

style.css cody/vishal-dcode/Incrementing Counter/style.css
5 Views
0 Comments
@import "https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap";
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: "Poppins";
index.html cody/vishal-dcode/Incrementing Counter/index.html
24 Views
0 Comments
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="style.css" />
<link